package routers

import (
	"github.com/gin-gonic/gin"
	"mishop/controllers"
)

func InitCategoryRouter(router *gin.Engine) {
	p := router.Group("/category")
	{
		controller := controllers.NewCategory()
		p.GET("/", controller.All)
		p.GET("/:category_id", controller.Show)
		p.PUT("/:category_id", controller.Update)
		p.DELETE("/:category_id", controller.Delete)
		p.POST("/", controller.Store)
	}
}
